perm filename DEFINE.SAI[PIC,HE] blob sn#421651 filedate 1979-02-25 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	  comment
C00006 ENDMK
CāŠ—;
  comment
  
  Starting date of this file: March 2, 1978.
  This file contains all the definitions that most SAIL
  programs would routinely need.  The DEFINEs and REQUIREs are
  arranged alphabetically as much as possible.;

  require  "<><>"  delimiters;
  define  crlf = "'15 & '12",  zero = "0",
          onebit = "1", byte = "8", word = "36",
          cmu = "0", usc = "1";
  define  infinity = "65535";

  define  ! = "comment";
  
  comment
    Efficient packing and unpacking of 2 items of data in a
    36-bit word.  These two routines are due to Keith Price.
                   August 4, 1978.;

  define  unpack(iw,owl,owr) = <
          start!code
            MOVE	1,IW;
            HLRZM	1,OWL;
            HRRZM	1,OWR;
          end>;
  define  pack(iwl,iwr,ow) = <
          start!code
            HRL	1,IWL;
            HRR		1,IWR;
            MOVEM	1,OW;
          end>;

  comment
    All the data files that we will make will have headers
    of 128 words in them:;

  	define  hdrl = "128";

  comment
    Certain numeric procedures are separately implemented
    and their declarations are contained in:;

        require  "numric.dcl"  source!file;

  comment
    Useful utility procedures have been compiled by Keith Price
    and you can find their declarations in:;

        require  "utils.dcl"  source!file;


  integer  msec;  ! used for runtime measurement;

  comment
    This compiler switch enables it to produce fast code
    where real/integer integer/real conversions are involved:;

        require  "36A"  compiler!switches;


  define  pprint(str) = <print(" str: ",str)>;

  define  bell = <print("Ļ€")>;


  define  waitcrlf = <
        print(" Waiting for a crlf","↑G");  intty>;

  require  "vrtual.dcl"  source!file;